/*
 * Copyright (c) 2021 minglong@iscas.ac.cn
 *
 * Redistribution and use in source and binary forms, with or without modification,
 * are permitted provided that the following conditions are met:
 *
 * 1. Redistributions of source code must retain the above copyright notice, this list of
 *    conditions and the following disclaimer.
 *
 * 2. Redistributions in binary form must reproduce the above copyright notice, this list
 *    of conditions and the following disclaimer in the documentation and/or other materials
 *    provided with the distribution.
 *
 * 3. Neither the name of the copyright holder nor the names of its contributors may be used
 *    to endorse or promote products derived from this software without specific prior written
 *    permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
import type { AppRouteModule } from '/@/router/types';

import { LAYOUT } from '/@/router/constant';
import { t } from '/@/hooks/web/useI18n';

const community: AppRouteModule = {
  path: '/community',
  name: 'Community',
  component: LAYOUT,
  redirect: '/community/index',
  meta: {
    orderNo: 12,
    title: t('routes.community.title'),
  },
  children: [
    {
      path: 'index',
      name: 'index',
      component: () => import('/@/views/community/index.vue'),
      meta: {
        // affix: true,
        title: t('routes.community.title'),
      },
    },
    {
      path: 'roles',
      component: () => import('/@/views/community/roles.vue'),
      name: 'roles',
      meta: { title: t('routes.community.roles') }
    },
    {
      path: 'contribution',
      component: () => import('/@/views/community/contribution.vue'),
      name: 'contribution',
      meta: { title: t('routes.community.contribution') }
    },
    {
      path: 'maillist',
      component: () => import('/@/views/community/mail_list.vue'),
      name: 'mail_list',
      meta: { title: t('routes.community.maillist') }
    },
    /*{
      path: 'statistics',
      component: () => import('/@/views/community/statistics.vue'),
      name: 'maillist',
      meta: { title: t('routes.community.statistics') }
    },*/
    {
      path: 'tradeMark',
      component: () => import('/@/views/footer/tradeMark.vue'),
      name: 'tradeMark',
      meta: { title: t('routes.community.tradeMark') }
    },
    {
      path: 'projects_management',
      component: () => import('/@/views/footer/projects_management.vue'),
      name: 'projects_management',
      meta: { title: t('routes.community.projects_management') }
    },
    {
      path: 'pmc',
      component: () => import('/@/views/community/pmc.vue'),
      name: 'pmc',
      meta: { 
        hideBreadcrumb: true,
        hideMenu: true,
        title: t('routes.community.pmc') 
      }
    },
    {
      path: 'COC',
      component: () => import('/@/views/community/COC.vue'),
      name: 'COC',
      meta: { 
        hideBreadcrumb: true,
        hideMenu: true,
        title: t('routes.community.COC') 
      }
    },
    {
      path: 'committers',
      component: () => import('/@/views/community/committers.vue'),
      name: 'committers',
      meta: { 
        hideBreadcrumb: true,
        hideMenu: true,
        title: t('routes.community.committers') 
      }
    },
    {
      path: 'guidelines_role_grouth',
      component: () => import('/@/views/community/guidelines_role_grouth.vue'),
      name: 'guidelines_role_grouth',
      meta: { 
        hideBreadcrumb: true,
        hideMenu: true,
        title: t('routes.community.guidelines_role_grouth') 
      }
    },
    {
      path: 'contribution_index',
      component: () => import('/@/views/documents/contribute/Readme-CN.vue'),
      name: 'contribution_index',
      meta: { 
        hideBreadcrumb: true,
        hideMenu: true,
        title: t('routes.community.contribution_index') 
      }
    },
    {
      path: 'community_communication',
      component: () => import('/@/views/documents/contribute/社区沟通与交流.vue'),
      name: 'community_communication',
      meta: { 
        hideBreadcrumb: true,
        hideMenu: true,
        title: t('routes.community.community_communication') 
      }
    },
  ],
};

export default community;
